允许和拒绝 Teams 会议大厅中的用户 您所在的位置:网站首页 teams lobby 允许和拒绝 Teams 会议大厅中的用户

允许和拒绝 Teams 会议大厅中的用户

#允许和拒绝 Teams 会议大厅中的用户| 来源: 网络整理| 查看: 265

你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。

管理 Teams 会议大厅 项目 04/13/2023

API 大厅在 或 TeamsCall 类上Call允许用户允许和拒绝来自 Teams 会议大厅的参与者。

本文介绍如何使用 Azure 通信服务调用 SDK 来允许和拒绝来自 Microsoft Teams 会议大厅的参与者。

必备条件 具有活动订阅的 Azure 帐户。 免费创建帐户。 已部署的通信服务资源。 创建通信服务资源。 用于启用通话客户端的用户访问令牌。 有关详细信息,请参阅创建和管理访问令牌。 可选:完成快速入门向应用程序添加语音呼叫

用户最终会根据 Microsoft Teams 配置在大厅中。 此处介绍了这些控件: 了解有关 Teams 配置的详细信息

Microsoft 365 或 Azure 通信服务 用户可以允许或拒绝大厅中的用户,前提是他们已连接到 Teams 会议,并且具有组织者、共同组织者或演示者会议角色。 详细了解会议角色

若要在 Teams 管理中心更新或检查当前的会议加入&大厅策略:了解有关 Teams 策略的详细信息

获取远程参与者属性

第一件事是获取录取者 或 CallTeamsCall 对象: 了解如何加入 Teams 会议

若要了解大厅中的人员,可以检查远程参与者的状态。 remoteParticipant具有 InLobby 状态的 表示远程参与者位于大厅中。 remoteParticipants获取集合:

let remoteParticipants = call.remoteParticipants; // [remoteParticipant, remoteParticipant....]

获取远程参与者的状态:

const state = remoteParticipant.state;

可以在订阅方法中检查远程参与者状态:详细了解事件和订阅

// Subscribe to a call obj. // Listen for property changes and collection updates. subscribeToCall = (call) => { try { // Inspect the call's current remote participants and subscribe to them. call.remoteParticipants.forEach(remoteParticipant => { subscribeToRemoteParticipant(remoteParticipant); }) // Subscribe to the call's 'remoteParticipantsUpdated' event to be // notified when new participants are added to the call or removed from the call. call.on('remoteParticipantsUpdated', e => { // Subscribe to new remote participants that are added to the call. e.added.forEach(remoteParticipant => { subscribeToRemoteParticipant(remoteParticipant) }); // Unsubscribe from participants that are removed from the call e.removed.forEach(remoteParticipant => { console.log('Remote participant removed from the call.'); }) }); } catch (error) { console.error(error); } } // Subscribe to a remote participant obj. // Listen for property changes and collection updates. subscribeToRemoteParticipant = (remoteParticipant) => { try { // Inspect the initial remoteParticipant.state value. console.log(`Remote participant state: ${remoteParticipant.state}`); if(remoteParticipant.state === 'InLobby'){ console.log(`${remoteParticipant._displayName} is in the lobby`); } // Subscribe to remoteParticipant's 'stateChanged' event for value changes. remoteParticipant.on('stateChanged', () => { console.log(`Remote participant state changed: ${remoteParticipant.state}`); if(remoteParticipant.state === 'InLobby'){ console.log(`${remoteParticipant._displayName} is in the lobby`); } else if(remoteParticipant.state === 'Connected'){ console.log(`${remoteParticipant._displayName} is in the meeting`); } }); } catch (error) { console.error(error); } }

在接受或拒绝 remoteParticipant 状态 InLobby 之前,可以获取远程参与者的标识符:

const identifier = remoteParticipant.identifier;

identifier可以是以下CommunicationIdentifier类型之一:

{ communicationUserId: '


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有